var _ = require("lodash");
// _.assignIn(object, [sources])
// 这个方法类似_.assign， 除了它会遍历并继承来源对象的属性
function Foo() {
  this.a = 1;
}

function Bar() {
  this.c = 3;
}

Foo.prototype.b = 2;
Bar.prototype.d = 4;
let obj = { a: 0 };
_.assignIn(obj, new Foo(), new Bar());
console.log(obj);
